; Set up assigns etc. both for users booting from the CD and from HD
;
; Version 1.1 - Changed jpegtmp
;
; Version 1.2 - Added uninit option
;
; Version 1.3 - Added CHECK argument and link to Prefs editor
If {arg} EQ "CHECK" ; Exit if InitCD has been run, otherwise ask
If $CDInit EQ TRUE
Skip END
Else
set init `RequestChoice "CU Amiga CD" "InitCD needs to be run first*NWould you like to run it now?" "Yes|No"`
If $init EQ 0
Skip END
EndIf
EndIf
EndIf
if CDBoot EQ TRUE
C:NoReset
endif
If $CDInit EQ TRUE
If $CDBoot EQ TRUE ; don't run UninitCD if booted from CD
RequestChoice >NIL: "CU Amiga CD" "You do not need to run InitCD*Nwhen you have booted from the CD" "OK"
Quit
EndIf
set remass `RequestChoice "InitCD" "You have already run InitCD once.*NDo you wish to remove the assigns and paths added before?" "Remove|Cancel"`
If $remass EQ 1
execute UnInitCD
EndIf
Quit
EndIf
Assign CUCD: :
; start arexx if not running
CUCD:rexxc/rx "address command" >NIL:
If WARN
CUCD:System/RexxMast >NIL:
EndIf
; Set these assigns and paths only if not booting from CD
IF $CDBoot NOT EQ TRUE
Run >NIL: RequestChoice "InitCD" "Setting up some assigns and paths to run software from the CD.*NIf you wish to remove the CD from the drive, run InitCD again,*Notherwise the icon will stay on the Workbench." " OK "
; Update workbench paths unless running Directory Opus 5.11 or 5.5 in WBR mode
IF $CDBoot NOT EQ TRUE
Version >NIL: C:LoadWB 43
If WARN
LoadWB NEWPATH
Else
Version >NIL: C:LoadWB 60
If NOT WARN
LoadWB NEWPATH
EndIf
EndIf
EndIf
; Give options for setting CD preferences
If $CDBoot NOT EQ TRUE
Version >NIL:
If $Kickstart GT 39
set edit `RequestChoice "CU Amiga CD" "CUCD now has a preferences program to specify*N the tools used to view/hear different types of files.*NWould you like to run it now?" "Yes|No"`
If $edit EQ 1
:RexxC/MuiRexx :S/CUCDPrefs.mrx port CDPREFS
Else
RequestChoice >NIL: "CU Amiga CD" "You can run CUCD preferences at any time.*NIt is in the Prefs drawer of the CD" "OK"
EndIf
Else
If NOT EXISTS ENV:IDer.prefs
Copy >NIL: CUCD:S/IDer.prefs_OS2 ENV:IDer.prefs
;RequestChoice >NIL: "CU Amiga CD" "You cannot use the CUCD preferences program with Workbench 2.*NIf you wish to configure the default action for each file type,*Nyou can copy IDer.prefs from the S directory of the CD to*Nyour ENVARC: directoryand edit it as described in*NCUCD:System/CDSupport/IDer/IDer.guide" "OK"